Typically, many processes concurrently run on a computer system. These processes may have different priority levels. A priority level refers to an attribute associated by a process scheduling mechanism to determine how often and for how long a process is scheduled for CPU time relative to other processes. Generally, processes with higher priority are scheduled more often and/or for more CPU time than processes with lower priority.
At any given time, a subset of these processes may be ready to execute. Once placed in an executing state, a process often tries to execute as much as possible, in order to finish its work in as little time as possible. The process may monopolize CPU time for an extended period at other processes' expenses.
Unfortunately, when one or more processes monopolize CPU time, the overall performance of the computer system is actually reduced. For example, if the computer system on which a runaway process resides is a node in a multi-node system, then the node may not be able to timely respond to and coordinate with other nodes in the multi-node system, causing the node to be evicted of the multi-node system.
Sometimes, when a low-priority process holds a latch required by a high-priority process, an intermediate priority process may monopolize CPU time forcing the high-priority process to wait for the release of the latch by the low-priority process. Since the low-priority process also cannot proceed (e.g., to release the latch) due to lack of CPU time (which is being taken by the intermediate priority process), the intermediate priority process may continue to monopolize CPU time.
Under some techniques, a low-priority process that holds a latch that is being waited for by a higher-priority process is temporarily elevated to a priority level of the higher-priority process. However, if the process that monopolizes CPU time is of a priority level that is equal to or higher than the elevated priority level, then the low-priority process still may not timely release the latch.
The effects of this type of problems can be wide-ranging, as other processes and other computers may very well depend on the processes that have been directly impacted. For example, other processes and other systems such as application servers, web servers, or client applications may depend on the low-priority process and the higher-priority process described above.
As clearly shown, techniques are needed to dynamically monitor and rebalance priority levels of processes in computer systems.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.